<?php
require_once "routes/consultation_routes.php";
use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');

    $router->resources([
        //校区管理
        'campus'              => CampusController::class,

        //教室管理
        'classroom'           => ClassroomController::class,

        //问候语管理
        'greeting'            => GreetingController::class,

        //校历管理
        'school_calendar'     => School_calendarController::class,

        //部门管理
        'department'          => DepartmentController::class,

        //班型管理
        'class_type'          => Class_typeController::class,

        //班段管理
        'class_section'       => Class_sectionController::class,

        //分组管理
        'class_group'         => Class_groupController::class,

        //班级管理
        'squad'               => SquadController::class,

        //我的班级
        'my_squad'            => My_squadController::class,

        //学生管理(所有学生列表)
        'student'             => StudentController::class,

        //我的学生
        'my_student'          => My_studentController::class,

        //课程列表
        'crouse'              => CrouseController::class,

        //课时列表
        'crouse_time'         => CrousetimeController::class,

        //测试配置
        'test_config'         => Test_configController::class,

        //学期管理
        'term'   => TermController::class,

        //我的待完成事项
        'my_todo_notices'   => My_todo_noticesController::class,

        //我的已完成事项
        'my_done_notices'   => My_done_noticesController::class,

        //考勤记录
        'attendance_record'   => Attendance_recordController::class,

        //测试成绩记录
        'test_score_record'   => Test_score_recordController::class,

        //家校记录
        'jiaxiao_record'   => Jiaxiao_recordController::class,

        //听写配置
        'dictation_config'   => Dictation_configController::class,
        //听写配置
        'zuoye_config'   => Zuoye_configController::class,

        //听写记录
        'dictation_score_record'   => Dictation_score_recordController::class,

        //作业记录
        'zuoye_record'   => Zuoye_recordController::class,

        //教学进度树
        // 'teaching_plan' => Teaching_planController::class,


        //日程管理(废弃)
        'schedule'            => ScheduleController::class,
        //考勤周期配置(废弃)
        'attendance_cycle'    => Attendance_cycleController::class,
        //学生考勤录入(废弃)
        'student_attendance'  => Student_attendanceController::class,
        //成绩录入(废弃)
        'student_mark'        => Student_markController::class,
        //考勤查看(废弃)
        'attendance_view'     => Attendance_viewController::class,
        //成绩录入(废弃)
        'student_mark_view'   => Student_mark_viewController::class,
        //教师管理(废弃)
        'teacher'             => TeacherController::class,
        //测试成绩单生成（废弃）
        'test_report'         => Test_reportController::class,
        //测试成绩录入（废弃）
        'test_score_enter'    => Student_score_enterController::class,
        //考勤单生成（废弃）
        'attendance_report'   => Attendance_reportController::class,
        //考勤单录入（废弃）
        'student_attendance_record'   => Student_attendance_recordController::class,

        'report_list'    =>   ReportListController::class,
        'student_lost'    =>   Student_lostController::class,
        'all_ques_list'    =>   Handle_entranceController::class,
        'api_mgr'    =>   ApimgrController::class,


        /*
        苦令营路由
         */
        //周期管理
		'kly_term'    =>   kly\Kly_termController::class,
        //大营配置
        'big_camp_config' => kly\Big_camp_configController::class,
        'small_camp_config' => kly\Small_camp_configController::class,
        'camp_group_config' => kly\Camp_group_configController::class,
        'kly_student_list' => kly\Kly_studentController::class,
        'Kly_notice'    =>   kly\Kly_noticeController::class,
        'Kly_record'    =>   kly\Kly_recordController::class,
    ]);
    $router->any('Kly_notice/ignore/{id}','kly\Kly_noticeController@ignore_notice');
    $router->get('my_squad/{squad_id}','My_squadController@show');
	$router->any('my_squad_report/squad/{squad_id}','My_squadController@report');
	$router->any('my_squad_report/getdata','My_squadController@getReportData');
    $router->get('report_list/{id}','ReportListController@show');
    $router->any('report_list/submit','ReportListController@submit');
    $router->any('report_list/delete','ReportListController@delete');
    /*
        考勤相关
    */
    //考勤录入(废弃)
    $router->get('attendance_entering/{student_id}','My_studentController@attendance_entering');
    //考勤录入(废弃)
    $router->get('attendance_enter','Student_attendanceController@attendance_data_make');
    //考勤录入(废弃)
    $router->any('attendance_enter_save','Student_attendanceController@attendance_enter_save');
    //考勤录入(废弃)
    $router->any('attendance_grid','Student_attendanceController@attendance_grid');
    $router->get('attendance_report/{attendance_report_id}','Attendance_reportController@show');

    /*
        测试相关
    */
    $router->any('test_config/delete','Test_configController@delete');
    //测试成绩录入(废弃)
    $router->get('mark_entering/{student_id}','My_studentController@mark_entering');
    //测试相关//考勤录入(废弃)
    $router->get('test_report/{test_report_id}','Test_reportController@show');
    //测试相关(废弃)
    $router->get('test_data_make','Student_markController@test_data_make');
    //测试相关(废弃)
    $router->any('test_data_save','Student_markController@test_data_save');
    //测试相关(废弃)
    $router->any('test_grid','Student_markController@test_grid');
    //测试相关(废弃)
    $router->get('test_score_enter/{test_report_id}','Student_score_enterController@index');
    //测试相关(废弃)
    $router->get('test_score_enter/{id}/edit','Student_score_enterController@edit');

    //首页日程
    $router->get('schedule_add_form/{selDate}','ScheduleController@schedule_add_form');
    $router->post('schedule_add_handle','ScheduleController@schedule_add_handle');
    $router->post('schedule_edit_handle','ScheduleController@schedule_edit_handle');
    $router->get('schedule_delete_handle/{eventid}','ScheduleController@schedule_delete_handle');
    $router->any('schedule_get','ScheduleController@schedule_get');



    //课表
    $router->any('crouse_sheet','CrousesheetController@index');
    $router->post('crouse_sheet/save','CrousesheetController@saveCrouse');
    $router->post('crouse_sheet/delete','CrousesheetController@deleteCrouse');
    $router->any('crouse_sheet/get/{id}','CrousesheetController@get');
    $router->any('crouse_sheet/set','CrousesheetController@setCrouse');
    $router->any('crouse_sheet/set/squad','CrousesheetController@getBySquad');
    $router->any('crouse_sheet/set/save','CrousesheetController@SaveSetCrouse');
    $router->any('crouse_sheet/set/delete','CrousesheetController@DeleteSetCrouse');
    $router->any('crouse_sheet/set/upload','CrousesheetController@UploadCrouse');

    //报表
    $router->any('report','ReportController@index');
    $router->any('report/index_new','ReportController@index_new');
    $router->any('report/export','ReportController@export');
    $router->any('report/get_kaoqin','ReportController@get_kaoqin');
    $router->any('report/get_zuoye','ReportController@get_zuoye');
    $router->any('report/get_jiaxiao','ReportController@get_jiaxiao');
    $router->any('report/get_ceyan','ReportController@get_ceyan');
    $router->any('report/get_tingxie','ReportController@get_tingxie');
    $router->any('report/get_kaoqin_stu','ReportController@get_kaoqin_stu');
    $router->any('report/get_zuoye_stu','ReportController@get_zuoye_stu');
    $router->any('report/get_jiaxiao_stu','ReportController@get_jiaxiao_stu');
    $router->any('report/get_ceyan_stu','ReportController@get_ceyan_stu');
    $router->any('report/get_tingxie_stu','ReportController@get_tingxie_stu');
    $router->any('report/save_memo','ReportController@save_memo');
    $router->any('report/get_memo','ReportController@get_memo');
/*    $router->any('report_list','ReportController@list');
    $router->any('report_list/{id}','ReportController@show1');
    $router->any('report_list/delete','ReportController@delete');
    $router->any('report_list/create','ReportController@create');
    $router->any('report_list/submit','ReportController@submit');*/
    $router->any('report/save','ReportController@save');
    $router->any('report/down','ReportController@down');
    $router->any('report/test_report','ReportController@test_report');
    $router->any('report/my_test_submit','ReportController@my_test_submit');

    $router->any('regulate','RegulateController@index');
    $router->any('regulate/submit','RegulateController@submit');
    $router->get('regulate/detail','RegulateController@detail');
    $router->any('regulate/detail_submit','RegulateController@detail_submit');
    $router->any('regulate/report','RegulateController@report');
    $router->any('regulate/report/submit','RegulateController@report_submit');
    $router->any('regulate/report_export_cond','RegulateController@report_export_cond');
    $router->any('regulate/report_export_cond_submit','RegulateController@report_export_cond_submit');

    //学生记录
    $router->any('student_detail','StudentDetailController@index');
    $router->any('student_detail/save','StudentDetailController@save');
    $router->any('student_report','StudentReportController@index');
    $router->any('quit_student','StudentController@quit_student');

    //转班，修退学申请
    $router->any('apply/get','ApplyController@get');
    $router->any('apply/submit','ApplyController@submit');
    $router->any('apply/my_apply','ApplyController@my_apply');
    $router->any('apply/delete','ApplyController@delete');
    $router->any('apply/update','ApplyController@update');
    $router->any('apply/apply_list','ApplyController@apply_list');
    $router->any('apply/sp_apply','ApplyController@sp_apply');
    $router->any('apply/sp','ApplyController@sp');

    //学分相关
    $router->any('credits','CreditsController@index');
    $router->any('credits/save','CreditsController@rule_save');
    $router->any('credits_view/{id}','CreditsController@credits_view');
    $router->any('credits_rule_view','CreditsController@credits_rule_view_edit');

    //班级月度报表
    $router->any('squad_month','Squad_monthController@index');
    $router->any('squad_month/view/{id}','Squad_monthController@squad_month_view');
    $router->any('squad_month/custom','Squad_monthController@custom');
    $router->any('squad_month/custom_submit','Squad_monthController@custom_submit');
    $router->any('squad_month/custom/export','Squad_monthController@custom_export');

    //问题班级列表
    $router->any('ProblemSquad','ProblemController@index');
    $router->any('ProblemSquad/problem_submit','ProblemController@problem_submit');



	// dashboard
	$router->any('report_dashboard','Report_dashboardController@index');
	// dashboard:获取初始数据
	$router->get('report_dashboard/index/get_init_data','Report_dashboardController@getInitData');
	// dashboard:根据squads.id制作一行
	$router->get('report_dashboard/index/mk_row','Report_dashboardController@mkRowById');
	$router->get('report_dashboard/index/del_row','Report_dashboardController@delRowById');
	// dashboard:获取班级情况数据
	$router->get('report_dashboard/index/get_situation_table','Report_dashboardController@getSituationTable');
	// dashboard:获取周流失情况数据
	$router->get('report_dashboard/index/get_week_lost_table','Report_dashboardController@getWeekLossTable');
	// dashboard:获取今日流失情况数据
	$router->get('report_dashboard/index/get_today_lost_table','Report_dashboardController@getTodayLossTable');
	// dashboard:获取今日流失情况详情数据
	$router->get('report_dashboard/index/get_today_lost_details','Report_dashboardController@getTodayLossDetails');
	// dashboard:班级追踪
	$router->get('report_dashboard/track/ids/{ids}','Report_dashboardController@track');
	// dashboard:班级追踪-制作表格
	$router->get('report_dashboard/track/mktable','Report_dashboardController@mkTrackTable');
	// dashboard:班级追踪-制作Hover表格
	$router->get('report_dashboard/track/mk_hover_table','Report_dashboardController@mkTrackHoverTable');
	// dashboard:班级对比
	$router->get('report_dashboard/contrast/ids/{ids}','Report_dashboardController@contrast');
	$router->get('report_dashboard/contrast/mktable','Report_dashboardController@mkContrastTable');



	// 教学、阅读等进度树 的 "手动"资源路由
	$router->get('teaching_plan','Teaching_planController@index');
	$router->get('teaching_plan/type/{type}','Teaching_planController@typedEntering');
	$router->post('teaching_plan','Teaching_planController@store');
	$router->get('teaching_plan/type/{type}/{id}','Teaching_planController@show');
	$router->get('teaching_plan/type/{type}/{id}/edit','Teaching_planController@edit');
	$router->put('teaching_plan/type/{type}/{id}','Teaching_planController@update');
	$router->delete('teaching_plan/type/{type}/{id}','Teaching_planController@destroy');
	$router->post('teaching_plan/type/{type}','Teaching_planController@reOrder');

	//Report_loss
	$router->any('report_loss','Report_lossController@index');
	$router->any('report_loss/get_overview_table','Report_lossController@getOverviewTable');
	$router->any('report_loss/get_startlesson_table','Report_lossController@getStartlessonTable');
	$router->any('report_loss/get_lesson_table','Report_lossController@getLessonTable');
	$router->any('report_loss/get_tutor_table','Report_lossController@getTutorTable');
	$router->any('report_loss/get_chapter_table','Report_lossController@getChapterTable');



    //待办忽略操作
    $router->post('my_todo_notices/ignore_notice', 'My_todo_noticesController@ignore_notice');

    $router->any('my_test','test_configController@my_test');


    $router->get('study_jindu_confirm_form/{notice_id}','Study_jindu_recordController@index');
    $router->post('study_jindu_confirm_save','Study_jindu_recordController@save');
	$router->post('study_jindu_confirm_form/clear_record','Study_jindu_recordController@clearRecord');

    $router->get('student_lost_detail','ApplyController@student_lost_detail');
    $router->any('lost_report','Lost_reportController@my_index');
    $router->any('export_lost_detail','Student_lostController@export_index');

    //巡场相关
    //偶发巡场
    $router->get('casual_xc','Casual_xcController@index');
    $router->get('casual_record_ques/{res_id}','Casual_xcController@record_ques');
    $router->any('casual_xc_save','Casual_xcController@casual_xc_save');
    //全场巡场
    $router->get('full_xc','Full_xcController@index');
    $router->get('full_xc_ready','Full_xcController@ready_view');
    $router->get('full_xc_record_ques','Full_xcController@record_ques');
    $router->any('full_xc_save','Full_xcController@full_xc_save');
    $router->any('full_old_xc_record','Full_xcController@full_old_xc_record');
    $router->any('handle_entrance','Handle_entranceController@my_index');
    $router->get('to_handle_ques','Handle_entranceController@to_handle_ques');
    $router->any('ques_handle_save/{record_id}','Handle_entranceController@ques_handle_save');
    $router->any('xc_report','Xc_reportController@navigation_view');
    $router->any('get_xc_data','Xc_reportController@get_xc_data');
	// 编辑备注
	$router->post('xc_report/edit_mark','Xc_reportController@editMark');
	// 获取图表数据
	$router->post('xc_report/get_chart_data','Xc_reportController@getChartData');
	// 联动搜索班级
	$router->any('linked_search_squad','Linked_search_squadController@getData');


	//苦令营相关
    $router->any('camp/setting','kly\CampSettingController@index');
    $router->any('camp/setting/create','kly\CampSettingController@setting_create');
    $router->any('camp/setting/save','kly\CampSettingController@setting_save');
    $router->any('camp/setting/delete','kly\CampSettingController@setting_delete');
    $router->any('camp/setting/updown','kly\CampSettingController@updown');
    //获取小营学生
    $router->any('get_camp_stus/{camp_id}','kly\Small_camp_configController@get_camp_stus');
    $router->post('save_camp_students','kly\Small_camp_configController@save_camp_students');
    //获取小组学生
    $router->any('get_camp_group_stus/{group_id}','kly\Camp_group_configController@get_camp_group_stus');
    $router->post('save_camp_group_students','kly\Camp_group_configController@save_camp_group_students');
    $router->any('kly_report','kly\Kly_reportController@index');
    $router->any('kly_report_list','kly\Kly_reportController@report_list');
    $router->any('kly_report_print','kly\Kly_reportController@report_print');
    $router->any('kly_report_get','kly\Kly_reportController@report_get');
    $router->any('kly_report_detail','kly\Kly_reportController@report_detail');
    $router->any('kly_report/save_memo','kly\Kly_reportController@save_memo');
    $router->any('kly_report_export','kly\Kly_reportController@report_export');
    $router->any('kly_report/student_get','kly\Kly_reportController@student_get');

    $router->any('squad_report','Squad_reportController@index');
    $router->any('squad_report/get','Squad_reportController@get');

    $router->any('SpeakReport','kly\Kly_reportController@speak_report');
    $router->any('SpeakReport/submit','kly\Kly_reportController@speak_report_submit');

    $router->any('exam_analysis','Teaching\analysisController@index');
    $router->any('analysis_submit','Teaching\analysisController@submit');
});
